﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:Reading.Controls"
    xmlns:clrControls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls">

    <Style TargetType="controls:ReadingControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ReadingControl">
                    <Canvas x:Name="ItemsContainer">
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" 
                                      Canvas.Left="-1500" 
                                      Height="{TemplateBinding Height}"
                                      Background="{TemplateBinding Background}" 
                                      Foreground="{TemplateBinding Foreground}" 
                                      Padding="{TemplateBinding Padding}">
                            <StackPanel>
                                <ContentControl ContentTemplate="{TemplateBinding ReadingTemplate}"/>
                            </StackPanel>
                        </ScrollViewer>
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" 
                                      Canvas.Left="0" 
                                      Height="{TemplateBinding Height}"
                                      Background="{TemplateBinding Background}" 
                                      Foreground="{TemplateBinding Foreground}" 
                                      Padding="{TemplateBinding Padding}">
                            <StackPanel>
                                <ContentControl ContentTemplate="{TemplateBinding ReadingTemplate}"/>
                            </StackPanel>
                        </ScrollViewer>
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" 
                                      Canvas.Left="1500" 
                                      Height="{TemplateBinding Height}"
                                      Background="{TemplateBinding Background}" 
                                      Foreground="{TemplateBinding Foreground}" 
                                      Padding="{TemplateBinding Padding}">
                            <StackPanel >
                                <ContentControl ContentTemplate="{TemplateBinding ReadingTemplate}"/>
                            </StackPanel>
                        </ScrollViewer>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>